-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove unnecessary pub enum glob-imports from rustc_middle::ty
#132580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
HIR ty lowering was modified cc @fmease Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
I also understand that the size of these commits are kinda unequal so I'm happy to split out the smaller ones 👍 |
This comment has been minimized.
This comment has been minimized.
65fc1a1
to
d458f85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
@bors r+ p=1 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (096277e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 3.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 779.675s -> 780.065s (0.05%) |
Remove unnecessary pub enum glob-imports from `rustc_middle::ty` We used to have an idiom in the compiler where we'd prefix or suffix all the variants of an enum, for example `BoundRegionKind`, with something like `Br`, and then *glob-import* that enum variant directly. `@noratrieb` brought this up, and I think that it's easier to read when we just use the normal style `EnumName::Variant`. This PR is a bit large, but it's just naming. The only somewhat opinionated change that this PR does is rename `BorrowKind::Imm` to `BorrowKind::Immutable` and same for the other variants. I think these enums are used sparingly enough that the extra length is fine. r? `@noratrieb` or reassign
We used to have an idiom in the compiler where we'd prefix or suffix all the variants of an enum, for example
BoundRegionKind
, with something likeBr
, and then glob-import that enum variant directly.@Noratrieb brought this up, and I think that it's easier to read when we just use the normal style
EnumName::Variant
.This PR is a bit large, but it's just naming.
The only somewhat opinionated change that this PR does is rename
BorrowKind::Imm
toBorrowKind::Immutable
and same for the other variants. I think these enums are used sparingly enough that the extra length is fine.r? @Noratrieb or reassign